/*
 * Exploder
 * 
 * Tero Pyylampi (218437), Jussi Tuurinkoski (211594)
 *
 * Abstract base class for all the objects in the game
 */

#ifndef GAMEOBJECT_H
#define GAMEOBJECT_H

#include "cocos2d.h"
#include "Box2D/Box2D.h"

class GameObject : public cocos2d::CCObject {
public:
	// default constructor
	GameObject();
	// default destructor
	virtual ~GameObject();

	// default update function
	virtual void update( cocos2d::ccTime dt ) = 0;

	// force remove from the game
	virtual void forceRemoveFromGame();
	// whether this object is to be removed from the game
	bool canBeRemovedFromTheGame();

	// helper function to calculate distance between two objects
	float calculateDistanceBetweenPositions( b2Vec2 pos1, b2Vec2 pos2 );

protected:
	// whether this object is to be removed
	bool mCanBeRemoved;
};

#endif